package com.hc.server;

public class Error {

	//系统错误
	public static final int SERVER_SYS_ERR_CD = 100;
	public static final String SERVER_SYS_ERR_MSG = "服务器系统故障！请拨打客服4000-xxx-xxx处理！";
	
	public static final int API_FORMAT_ERR_CD = 101;
	public static final String API_FORMAT_ERR_MSG = "请求数据格式错误。";
	
	public static final int API_NOFOUND_ERR_CD = 102;
	public static final String API_NOFOUND_ERR_MSG = "找不到对应的接口：";
	
	public static final int INVALID_ARGS_ERR_CD = 103;
	public static final String INVALID_ARGS_ERR_MSG = "请求缺少必要参数或格式错误。";
	
	public static final int CITY_NOFOUND_ERR_CD = 104;
	public static final String CITY_NOFOUND_ERR_MSG = "请求的城市不存在，请重新查询！";
	
	public static final int MALLSERVER_NET_ERR_CD = 201;
	public static final String MALLSERVER_NET_ERR_MSG = "系统网络故障，请联系客服处理";
	
	public static final int MALLSERVER_DATA_FORMAT_ERR_CD = 202;
	public static final String MALLSERVER_DATA_FORMAT_ERR_MSG = "系统数据故障，请联系客服处理";
	
	public static final int MALLSERVER_ERR_CD = 203;
	
	public static final int BILLSERVER_NET_ERR_CD = 301;
	public static final String BILLSERVER_NET_ERR_MSG = "系统网络故障，请联系客服处理";

	public static final int BILLSERVER_DATA_FORMAT_ERR_CD = 302;
	public static final String BILLSERVER_DATA_FORMAT_ERR_MSG = "创建账单失败，请联系客服处理！";
	
	public static final int BILLSERVER_ERR_CD = 303;
	public static final String BILLSERVER_ERR_MSG = "创建账单失败，请联系客服处理";
	
	public static final int STOCK_NOT_ENOUGH_CD = 401;	
	public static final String STOCK_NOT_ENOUGH_MSG = "您预订商品库存不足，请重新进行选择！";
	
	public static final int ORDER_NOFOUND_ERR_CD = 501;
	public static final String ORDER_NOFOUND_ERR_MSG = "不存在的订单，请联系管理员处理！";
	
	public static final int ORDER_STATUS_ERR_CD = 502;
	public static final String ORDER_STATUS_ERR_MSG = "订单状态异常，请联系管理员处理！";
	
	public static final int ORDER_AMOUNT_ERR_CD = 503;
	public static final String ORDER_AMOUNT_ERR_MSG = "订单应收金额与支付金额不匹配";
	

//	public static String getMsg(int cd){
//		String msg;
//		switch (cd) {
//		case SERVER_SYS_ERR_CD:
//			msg = SERVER_SYS_ERR_MSG;
//			break;
//		case NET_ERR_CD:
//			msg = NET_ERR_MSG;
//			break;
//		case CREAT_BILL_FAILE_CD:
//			msg =  CREAT_BILL_FAILE_MSG;
//			break;
//		case BILLSERVER_ERR_CD:
//			msg = BILLSERVER_ERR_MSG;
//			break;
//		default:
//			msg = "";
//			break;
//		}
//		return msg;
//	}
}
